package butines.game;

import butines.core.Image;
import butines.core.game.Obstacle;
import butines.core.math.Vector2f;

public class Tile implements Obstacle  {

	private Image image;
	private Vector2f position = new Vector2f();
	private float radius;
	private boolean walkable = true;

	public Image getImage() {
		return image;
	}

	public void setImage(Image image) {
		this.image = image;
		int w = image.getImageWidth() / 2;
		int h = image.getImageHeight() / 2;
		this.radius = (w + h) / 2;//(float) Math.sqrt(w * w + h * h);
	}

	public boolean isWalkable() {
		return walkable;
	}

	public void setWalkable(boolean walkable) {
		this.walkable = walkable;
	}

	public float getRadius() {
		return radius;
	}

	public Vector2f getPosition() {
		return position;
	}
}
